%%% dummy GUI for tests
%%% erl -sname "any" -setcookie "max" -run dummy start
-module(dummy).
-export([start/0, loop/0, send/1]).

start() ->
  register(any, spawn(dummy, loop, [])).

loop() ->
  receive
    stop ->
      ok;
    {2, Id} ->
      io:format("~p~n", [{dead, Id}]),
	    loop();
    {3, 0, Id, X, Y, SpawnW, MinW, W, Sp} ->
      io:format("~p~n", [{new_thing, 0, Id, X, Y, SpawnW, MinW, W, Sp}]),
	    loop();
    {4, Id, Veg} ->
      io:format("~p~n", [{fat_boy, Id, Veg}]),
	    loop();
    {5, Id, X, Y} ->
      io:format("~p~n", [{moved, Id, X, Y}]),
	    loop();
    Msg ->
      io:format("Dummy: ~p~n", [Msg]),
      loop()
  end.

send(Msg) ->
  {connector, 'sim@hopsiup'} ! Msg.

% dummy:send({the_thing, 1, 1, 10000, 1000, 3000, 1000}).
